import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static void main(String[] args) {
      Runner a=new Runner("Data");
      Thread thread1= new Thread(a);
      Thread thread2= new Thread(a);
      Runner b=new Runner("Info");
      Thread threadA=new Thread(b);
      Thread threadB=new Thread(b);
      Thread threadC=new Thread(b);
      Thread timer=new Thread(new Timer());
      thread1.setName("线程a1");
      thread1.setName("线程a2");
      threadA.setName("p");
        threadB.setName("p");
        threadC.setName("p");
        timer.setName("计时器");
        thread1.start();
        thread2.start();
        threadA.start();
        threadB.start();
        threadC.start();
        timer.start();
    }
}
class  Runner implements Runnable{
    String para;
    Runner(String para){
        this.para=para;
    }
    public  void  run(){
        int i=0;
        while(i<6){
            i++;
            System.out.println(para+" "+Thread.currentThread().getName());
            try{
                Thread.sleep(100);
            }catch (InterruptedException e){

            }
        }
    }
}
class Timer implements Runnable{
    public void run(){
        for (int i = 1; i <3 ; i++) {
            System.out.println(Thread.currentThread().getName());
            System.out.println(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
            try{
                Thread.sleep(300);
            }catch (InterruptedException e){
            }
        }
    }
}